package cn.edu.huanghuai.newsofhuanghuai.dao;

import cn.edu.huanghuai.newsofhuanghuai.pojo.News;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @user:whisper
 * @date:6-11
 * @description: 新闻DAO层
 */

@Mapper
public interface NewsDao {

     int addNews(News news);
     int deleteNews(int nid);
     int updateNews(News news);
     News queryNews(int nid);
     List<News> queryAllNews();

     /**
      * 根据新闻的标题进行模糊查询
      * @param name
      * @return
      */
     List<News>queryNewsByName(String title);
}
